---
title: "Balancing algorithm report"
output:
  html_document:
    df_print: paged
editor_options:
  chunk_output_type: console
---

```{r,message=FALSE,echo=FALSE}
library(dplyr)
```

```{r,echo=FALSE}
# Supply a "MyData.csv" to the directory,
# where column 1 of csv is the ID
clean <- read.csv("austria_clean.csv")
MyData=clean
MyData=select(MyData,Record.ID,joint,pol,sex,vot)
write.csv(MyData,"MyData.csv",row.names = F)
MyData <- read.csv("MyData.csv")
```

# Python (config = code) 
```{python engine.path="/usr/bin/python3.5",results='hide'}
import sys
sys.path.append('/home/shared/data/balancing/')
import drop
config = "{1: {'degreeHigh':9.9,'noDegreeHigh':39.5,'degreeLow':17.6,'noDegreeLow':33.0}},{2: {'interest':61.4,'LowInterest':38.6}},{3: {'Male':50.7,'Female':49.3}},{4: {'OVP':23.10,'SPO':20.62,'FPO':16.88,'GRN':12.43,'NEOS':6.97,'Undec':20.00}}"

filename = '/home/fernando/Misc/bjpolFinal/Austria/MyData.csv'

drop.run(config, filename, "/home/fernando/Misc/bjpolFinal/Austria/myBal", 3)
```

